<?php
require_once("../class/PrayList.php");
require_once("../class/Tool.php");

$praylist = new PrayList(5); 


if(isset($_POST["pid"]))
{
	if(($_POST["status"]) == "unapprove")
	{
		$praylist->approvePray($_POST["pid"], "true");
	}else{
		$praylist->approvePray($_POST["pid"], "unapprove");
	}
	$post_data = array('page' => $_POST["page"]);
}
else
{
	$post_data = array('page' => $_POST["page"]);
}

Tool::redirect_post("pray_admin.php", $post_data);

?>